package com.etong.frame.directive;

import java.util.ArrayList;
import java.util.List;

public class GroupDirective {
	private List<Directive> directives = new ArrayList<Directive>();
	private List<GroupConfig> groupConfigs = new ArrayList<GroupConfig>();

	public List<Directive> getDirectives() {
		return directives;
	}

	public void setDirectives(List<Directive> directives) {
		this.directives = directives;
	}

	public List<GroupConfig> getGroupConfigs() {
		return groupConfigs;
	}

	public void setGroupConfigs(List<GroupConfig> groupConfigs) {
		this.groupConfigs = groupConfigs;
	}

	public void addDirective(Directive directive) {
		directives.add(directive);
	}

	public List<String> getStatements() {
		List<String> statements = new ArrayList<String>();
		for (Directive directive : directives) {
			statements.add(((DirectiveConfig) directive).getStatementConfig());
		}
		return statements;
	}
}
